package Reflect;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Class cla=Class.forName("Reflect.Student");
        Constructor c=cla.getConstructor(String.class,int.class,char.class);
        Object obj=c.newInstance("张三",20,'男');
        System.out.println(obj);
    }
}
